﻿CREATE TABLE [dbo].[Finance_RunningAccount_Non] (
    [Id]               INT              IDENTITY (1, 1) NOT NULL,
    [RId]              UNIQUEIDENTIFIER CONSTRAINT [DF_Finance_RunningAccount_Non_RId] DEFAULT (newid()) NULL,
    [CreateDate]       DATETIME         CONSTRAINT [DF_Finance_RunningAccount_Non_CreateDate] DEFAULT (getdate()) NULL,
    [TradeDate]        NVARCHAR (10)    NULL,
    [Summary]          NVARCHAR (200)   NULL,
    [AccountsTypeId]   INT              NULL,
    [AccountsTypeName] NVARCHAR (50)    NULL,
    [PaymentTypeId]    INT              NULL,
    [PaymentTypeName]  NVARCHAR (50)    NULL,
    [BankId]           INT              NULL,
    [BankName]         NVARCHAR (50)    NULL,
    [Income]           NUMERIC (18, 2)  NULL,
    [Agent]            NVARCHAR (50)    NULL,
    [AgentName]        NVARCHAR (50)    NULL,
    [UserName]         NVARCHAR (50)    NULL,
    [EName]            NVARCHAR (50)    NULL,
    [CompanyId]        INT              NULL,
    [CompanyName]      NVARCHAR (200)   CONSTRAINT [DF_Finance_RunningAccount_Non_CompanyName] DEFAULT ('') NULL,
    [Description]      NVARCHAR (2000)  NULL,
    [BillNumber]       NVARCHAR (50)    NULL,
    CONSTRAINT [PK_Finance_RunningAccount_Non] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
CREATE NONCLUSTERED INDEX [EFS_IX_Finance_RunningAccount_Non_e63f7bb9005c42ceb928c8f28b5f084e]
    ON [dbo].[Finance_RunningAccount_Non]([AccountsTypeId] ASC, [CompanyId] ASC, [CreateDate] ASC);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'科目类别', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Finance_RunningAccount_Non', @level2type = N'COLUMN', @level2name = N'AccountsTypeId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'电汇', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Finance_RunningAccount_Non', @level2type = N'COLUMN', @level2name = N'PaymentTypeId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'银行', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Finance_RunningAccount_Non', @level2type = N'COLUMN', @level2name = N'BankId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'金额', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Finance_RunningAccount_Non', @level2type = N'COLUMN', @level2name = N'Income';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'发票号', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'Finance_RunningAccount_Non', @level2type = N'COLUMN', @level2name = N'BillNumber';

